import { lazy } from "react";
import {
  AppOutline,
  MessageOutline,
  MessageFill,
  UnorderedListOutline,
  UserOutline,
} from "antd-mobile-icons";
const Home = lazy(() => import("../pages/Home"));
const Layout = lazy(() => import("../pages/Layout"));
const Login = lazy(() => import("../pages/Login"));
const List = lazy(() => import("../pages/List"));
const Deitle = lazy(() => import("../pages/Deitle"));
const Order = lazy(() => import("../pages/Order"));
const Text = lazy(() => import("../pages/Text"));
const Prop = lazy(() => import("../pages/Prop"));
const User = lazy(() => import("../pages/User"));

export const HandleHomes = [
  {
    path: "/",
    element: <Home></Home>,
    title: "首页",
    icon: <AppOutline />,
  },
  {
    path: "/prop",
    element: <Prop></Prop>,
    title: "分类",
    icon: <MessageOutline />,
  },
  {
    path: "/text",
    element: <Text></Text>,
    title: "消息",
    icon: <MessageFill />,
  },
  {
    path: "/user",
    element: <User></User>,
    title: "个人中心",
    icon: < UserOutline/>,
  },
];

export const routes = [
  {
    path: "/",
    element: <Layout></Layout>,
    children: HandleHomes,
  },
  {
    path: "/list",
    element: <List></List>,
  },
  {
    path: "/order",
    element: <Order></Order>,
  },
  {
    path: "/deitle",
    element: <Deitle></Deitle>,
  },
  {
    path: "/login",
    element: <Login></Login>,
  },
];
